import 'package:base_moudle/index.dart';
import 'package:get/get.dart';

import '../../../models/data_model/zs_project_detail_model.dart';
import '../../work/zs_work_project_detail/zs_work_project_detail_logic.dart';
import 'hy_work_home_logic.dart';

class HyWorkProjectManage {
  static ProjectMap getProjectModel() {
    if (ZsMemeryCache.loginDataModel != null) {
      if (ZsMemeryCache.loginDataModel?.userInfo?.companyId == COM_XB) {
        if (Get.isRegistered<ZsWorkProjectDetailLogic>()) {
          final ZsWorkProjectDetailLogic logic =
              Get.find<ZsWorkProjectDetailLogic>();
          return logic.projectDetail.value;
        }
      } else {
        if (Get.isRegistered<HyWorkHomeLogic>()) {
          final HyWorkHomeLogic logic = Get.find<HyWorkHomeLogic>();
          return logic.projectDetail.value;
        }
      }
    }
    return ProjectMap();
  }
}
